﻿function GetTagsString() {
    //alert('GetTagsString');
    var values = [];
    $('#allowSpacesTags span.tagit-label').each(function () {
        //alert($(this).text());
        values.push($(this).text());
    });
    $("#ctl00_MainContent_hdnSelectedTags").val(values.join(","));
}

var millisecondsToWait = 20000;

function ClearSaveMsg() {
    //alert('ClearSaveMsg');
    $("#ctl00_MainContent_lblSaveMsg").fadeOut(20000);
    setTimeout(function () {
        $("#ctl00_MainContent_lblSaveMsg").empty();
        $("#ctl00_MainContent_lblSaveMsg").text("");
    }, millisecondsToWait);

}

function ClearSaveMsgAlert() {
    //alert('ss');
    $("#ctl00_MainContent_lblSaveMsg1").fadeOut(15000);
    setTimeout(function () {
        $("#ctl00_MainContent_lblSaveMsg1").empty();
        $("#ctl00_MainContent_lblSaveMsg1").text("");
    }, millisecondsToWait);

}
function ClearInfo(msg, id) {
    $("#" + id).text(msg);
    $("#" + id).fadeOut(15000);
    setTimeout(function () {
        $("#" + id).empty();
        $("#" + id).text("");
    }, millisecondsToWait);

}

function InfoUpdate(msg, id, color) {
    //alert('InfoUpdate');

    $("#" + id).text(msg);
    $("#" + id).css({
        'float': 'right',
        'color': color,
    });
    $("#" + id).fadeOut(15000);
    setTimeout(function () {
        $("#" + id).empty();
        $("#" + id).text("");
    }, millisecondsToWait);

}

function ShowWait(id) {
    //alert('ShowWait ' + id);
    $("#" + id).css({ "display": "inline" });
}
function HideWait(id) {
    //alert('HideWait ' + id);
    $("#" + id).css({ "display": "none" });
}
